package com.wangyuhang;

import com.wangyuhang.config.SpringConfig;
import com.wangyuhang.dao.userDao;
import com.wangyuhang.service.userService;
import com.wangyuhang.vo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class test2 {
    public static void main(String[] args) {
        ApplicationContext applicationContext=new AnnotationConfigApplicationContext(SpringConfig.class);
        userService service = applicationContext.getBean(userService.class);
        User user = service.selectUser("zhangsan");
        System.out.println(user);
    }
}
